<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="_empenho.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">

			<h:form id="form">
				
				
				<p:dataTable id="listEmpenho" value="#{empenhoBean.empenhos}"
					var="empenho" paginator="true" rows="20" style="font-size: 11px" emptyMessage="Não Encontrado" update="@form" dynamic="true" >

					<f:facet name="header">
						<h:outputText value="EMPENHOS CADASTRADOS" />
					</f:facet>

					<p:column sortBy="#{empenho.numero}" filterBy="#{empenho.numero}" filterMatchMode="contains"
						headerText="Número" style="float: center; text-align: center;">
						<h:outputText value="#{empenho.numero}" />
					</p:column>
					
					<p:column filterBy="#{empenho.processo}" filterMatchMode="contains" 
						headerText="Processo" style="float: center; text-align: center;">
						<h:outputText value="#{empenho.processo}" />
					</p:column>

					<p:column sortBy="#{empenho.data}" headerText="Data de Emissão" style="float: center; text-align: center;">
						<h:outputText value="#{empenho.data.time}" >
							<f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" locale="pt_BR" />
						</h:outputText>	
					</p:column>

					<p:column sortBy="#{empenho.valor_total}" headerText="Valor Total">
						<h:outputText value="#{empenho.valor_total}">
							<f:convertNumber pattern="#,##0.00" />
						</h:outputText>	
					</p:column>

					<p:column filterBy="#{empenho.interessado}" headerText="Interessado">
						<h:outputText value="#{empenho.interessado}" />
					</p:column>
					
					<p:column sortBy="#{empenho.tipo}" filterBy="#{empenho.tipo}" filterMatchMode="contains" 
							headerText="Tipo">
						<h:outputText value="#{empenho.tipo}" />
					</p:column>
					
					<p:column sortBy="#{empenho.status}" filterBy="#{empenho.status}" filterMatchMode="contains" 
							headerText="Status">
						<h:outputText value="#{empenho.status}" />
					</p:column>
						
				</p:dataTable>
				
<!-- 				<div align="center" style="float: center; align-text: center;"> -->
<!-- 				<h:panelGrid columns="4"> -->
<!-- 					<p:panel header="Relatório"> -->
<!-- 						<h:commandLink> -->
<!-- 							<p:graphicImage value="resources/img/excel.png" /> -->
<!-- 							<p:dataExporter type="xls" target="listEmpenho" fileName="empenho" /> -->
<!-- 						</h:commandLink> -->

<!-- 						<h:commandLink> -->
<!-- 							<p:graphicImage value="resources/img/pdf.png" /> -->
<!-- 							<p:dataExporter type="pdf" target="listEmpenho" fileName="empenho" /> -->
<!-- 						</h:commandLink> -->
<!-- 					</p:panel> -->
				
<!-- 					<p:panel header="Relatório da Página"> -->
<!-- 						<h:commandLink> -->
<!-- 							<p:graphicImage value="resources/img/excel.png" /> -->
<!-- 							<p:dataExporter type="xls" target="listEmpenho" fileName="empenho" -->
<!-- 							pageOnly="true" /> -->
<!-- 						</h:commandLink> -->
					
<!-- 					<h:commandLink> -->
<!-- 							<p:graphicImage value="resources/img/pdf.png" /> -->
<!-- 							<p:dataExporter type="pdf" target="listEmpenho" fileName="empenho" pageOnly="true" /> -->
<!-- 						</h:commandLink>	 -->
<!-- 					</p:panel> -->
<!-- 				</h:panelGrid>	 -->
<!-- 				</div> -->

			</h:form>
		</div>


	</ui:define>
</ui:composition>
</html>